/**
 * 操作对象
 */
export const Operator = {
  equals: 'equals',
  greater: 'greater',
  less: 'less',
  greaterEqual: 'greaterEqual',
  lessEqual: 'lessEqual',
  contains: 'contains',
  between: 'between',
  startsWith: 'startsWith',
  endsWith: 'endsWith',
  recent: 'recent',
  before: 'before',
  after: 'after',
  notEquals: 'notEquals',
  notContains: 'notContains'
}

// 操作符配置
export const OperatorGroup = {
  text: [
    { label: '包含', value: Operator.contains },
    { label: '等于', value: Operator.equals },
    { label: '开头是', value: Operator.startsWith },
    { label: '结尾是', value: Operator.endsWith }
  ],
  number: [
    { label: '等于', value: Operator.equals },
    { label: '大于', value: Operator.greater },
    { label: '小于', value: Operator.less },
    { label: '大于等于', value: Operator.greaterEqual },
    { label: '小于等于', value: Operator.lessEqual },
    { label: '介于', value: Operator.between }
  ],
  date: [
    { label: '最近', value: Operator.recent },
    { label: '等于', value: Operator.equals },
    { label: '早于', value: Operator.before },
    { label: '晚于', value: Operator.after },
    { label: '介于', value: Operator.between }
  ],
  daterange: [{ label: '介于', value: Operator.between }],
  select: [
    { label: '等于', value: Operator.equals },
    { label: '不等于', value: Operator.notEquals }
  ],
  multiple: [
    { label: '包含', value: Operator.contains },
    { label: '不包含', value: Operator.notContains },
    { label: '等于', value: Operator.equals }
  ]
}
